const FORM_ITEM_LIST = [
  {
    prop: 'productName',
    label: '商品名称',
    type: 'input',
  },
  {
    prop: 'spuNo',
    label: 'SPU编码',
    type: 'input',
    searchType: 'EQ'
  },
  {
    prop: 'categoryPath',
    label: '分类',
    type: 'input',
  },
  {
    prop: 'skuNo',
    label: 'SKU编码',
    type: 'input',
    searchType: 'EQ'
  },
  {
    prop: 'brandName',
    label: '品牌',
    type: 'input',
  },
  {
    prop: 'checkItemType',
    label: '验收事项',
    type: 'select',
    clearable: true,
    options: [
      {
        value: '1',
        label: '数字'
      },
      {
        value: '2',
        label: '文本'
      }
    ],
  },
]
const TABLE_COLUMNS = [
  {
    title: '分类',
    key: 'categoryPath',
  },
  {
    title: 'SKU编码',
    key: 'skuNo',
  },
  {
    title: 'SPU编码',
    key: 'spuNo',
  },
  {
    title: '商品名称',
    key: 'productName',
  },
  {
    title: '规格',
    key: 'specDetail',
  },
  {
    title: '验收事项',
    key: 'checkItemName',
  },
  {
    title: '验收次数',
    key: 'checkCount',
  },
  {
    title: '验收频率',
    key: 'checkFrequency',
  },
  {
    title: '验收时间',
    key: 'checkTime',
  },
  {
    title: '事项类型',
    key: 'checkItemTypeStr',
  },
  {
    title: '标准值',
    key: 'standardValue',
  },
  {
    title: '上差',
    key: 'upDiffValue',
  },
  {
    title: '下差',
    key: 'downDiffValue',
  },
  {
    title: '验收方法',
    key: 'checkMethod',
  }
]
const EDIT_TABLE_COLUMNS = [
  {
    title: '品类',
    align: 'center',
    key: 'categoryPath'
  },
  {
    title: 'SPU编码',
    align: 'center',
    key: 'spuNo',
    width: 90
  },
  {
    title: 'SKU编码',
    align: 'center',
    key: 'skuNo',
    width: 90
  },
  {
    title: '商品名称',
    align: 'center',
    key: 'productName'
  },
  {
    title: '规格',
    align: 'center',
    key: 'specDetail'
  },
  {
    title: '品牌',
    align: 'center',
    key: 'brandName'
  },
  {
    title: '验收频率',
    key: 'checkFrequency',
    required: true,
    type: 'inputNumPrecision',
    precision: 0,
    minVal: 1,
    width: 150
  },
  {
    title: '验收时间',
    key: 'checkTime',
    required: true,
    type: 'select',
    isDisabled: row => row.canEditCheckTime == false,
    options: [
      {
        value: '入库前',
        label: '入库前'
      },
      {
        value: '入库后',
        label: '入库后'
      }
    ]
  }
]
const EDIT_TABLE_CHILDREN_COLUMNS1 = [
  {
    title: '验收次数',
    align: 'center',
    key: 'checkCount',
    type: 'inputNumPrecision',
    minVal: 1,
    maxVal: 5,
    width: 150
  },
  {
    title: '标准值',
    align: 'center',
    key: 'standardValue',
    type: 'inputChange',
    width: 150
  },
  {
    title: '上差值',
    align: 'center',
    key: 'upDiffValue',
    type: 'inputNum',
    width: 150
  },
  {
    title: '下差值',
    align: 'center',
    key: 'downDiffValue',
    type: 'inputNum',
    width: 150
  },
  {
    title: '验收方法',
    align: 'center',
    key: 'checkMethod',
    type: 'input',
    width: 150
  }
]
const EDIT_TABLE_CHILDREN_COLUMNS2 = [
  {
    title: '验收次数',
    align: 'center',
    key: 'checkCount',
    type: 'inputNumPrecision',
    minVal: 1,
    maxVal: 5,
    width: 150
  },
  {
    title: '标准值',
    align: 'center',
    key: 'standardValue',
    type: 'inputChange',
    width: 150
  },
  {
    title: '验收方法',
    align: 'center',
    key: 'checkMethod',
    type: 'input',
    width: 150
  }
]
// 批量编辑潜在商品
const BATCH_EDIT_TABLE_COLUMNS = [
  {
    title: '品类',
    align: 'center',
    key: 'categoryPath'
  },
  {
    title: 'SPU编码',
    align: 'center',
    key: 'spuNo',
    width: 90
  },
  {
    title: 'SKU编码',
    align: 'center',
    key: 'skuNo',
    width: 90
  },
  {
    title: '商品名称',
    align: 'center',
    key: 'productName'
  },
  {
    title: '规格',
    align: 'center',
    key: 'specDetail'
  },
  {
    title: '品牌',
    align: 'center',
    key: 'brandName'
  },
  {
    title: '验收频率',
    required: true,
    align: 'center',
    width: 120,
    children: [
      {
        title: '原值',
        align: 'center',
        key: 'checkFrequency',
        width: 90
      },
      {
        title: '现值',
        align: 'center',
        key: 'checkFrequencyUpdate',
        type: 'inputNumPrecision',
        precision: 0,
        minVal: 1,
        width: 150
      }
    ]
  },
  {
    title: '验收时间',
    required: true,
    align: 'center',
    width: 120,
    children: [
      {
        title: '原值',
        align: 'center',
        key: 'checkTime',
        width: 120
      },
      {
        title: '现值',
        align: 'center',
        key: 'checkTimeUpdate',
        type: 'select',
        isDisabled: row => row.canEditCheckTime == false,
        options: [
          {
            value: '入库前',
            label: '入库前'
          },
          {
            value: '入库后',
            label: '入库后'
          }
        ]
      }
    ]
  }
]
const BATCH_EDIT_TABLE_CHILDREN_COLUMNS1 = [
  {
    title: '验收次数原值',
    align: 'center',
    key: 'checkCount'
  },
  {
    title: '验收次数现值',
    align: 'center',
    key: 'checkCountUpdate',
    type: 'inputNumPrecision',
    minVal: 1,
    maxVal: 5,
    width: 150
  },
  {
    title: '标准值原值',
    align: 'center',
    key: 'standardValue'
  },
  {
    title: '标准值现值',
    align: 'center',
    key: 'standardValueUpdate',
    type: 'inputChange',
    width: 150
  },
  {
    title: '上差值原值',
    align: 'center',
    key: 'upDiffValue'
  },
  {
    title: '上差值现值',
    align: 'center',
    key: 'upDiffValueUpdate',
    type: 'inputNum',
    width: 150
  },
  {
    title: '下差值原值',
    align: 'center',
    key: 'downDiffValue'
  },
  {
    title: '下差值现值',
    align: 'center',
    key: 'downDiffValueUpdate',
    type: 'inputNum',
    width: 150
  },
  {
    title: '验收方法原值',
    align: 'center',
    key: 'checkMethod'
  },
  {
    title: '验收方法现值',
    align: 'center',
    key: 'checkMethodUpdate',
    type: 'input',
    width: 150
  }
]
const BATCH_EDIT_TABLE_CHILDREN_COLUMNS2 = [
  {
    title: '验收次数原值',
    align: 'center',
    key: 'checkCount'
  },
  {
    title: '验收次数现值',
    align: 'center',
    key: 'checkCountUpdate',
    type: 'inputNumPrecision',
    minVal: 1,
    maxVal: 5,
    width: 150
  },
  {
    title: '标准值原值',
    align: 'center',
    key: 'standardValue'
  },
  {
    title: '标准值现值',
    align: 'center',
    key: 'standardValueUpdate',
    type: 'inputChange',
    width: 150
  },
  {
    title: '验收方法原值',
    align: 'center',
    key: 'checkMethod'
  },
  {
    title: '验收方法现值',
    align: 'center',
    key: 'checkMethodUpdate',
    type: 'input',
    width: 150
  }
]
export {
  FORM_ITEM_LIST,
  TABLE_COLUMNS,
  EDIT_TABLE_COLUMNS,
  EDIT_TABLE_CHILDREN_COLUMNS1,
  EDIT_TABLE_CHILDREN_COLUMNS2,
  BATCH_EDIT_TABLE_COLUMNS,
  BATCH_EDIT_TABLE_CHILDREN_COLUMNS1,
  BATCH_EDIT_TABLE_CHILDREN_COLUMNS2,
}
